//
//  MGCommonParamsGenerator.m
//  CPManage
//
//  Created by lvho on 17/4/14.
//  Copyright © 2017年 com.jiaoshou.chen. All rights reserved.
//

#import "MSCommonParamsGenerator.h"
#import "sys/utsname.h"



@implementation MSCommonParamsGenerator

+ (NSDictionary *)JSONKeyPathsByPropertyKey{

    NSDictionary *dic = @{@"uuid":@"uuid",
                          @"token":@"token",
                          @"appVersion":@"appVersion",
                          @"osVersion":@"osVersion",
                          @"device":@"device",
                          @"did":@"did",
                          @"os":@"os",
                          @"seqid":@"seqid"};
    return dic;
}

- (NSString *)uuid {
    return @"7859026435b7454abbef35225c7d01a0";
}

- (NSString *)token {
    return @"7859026435b7454abbef";
}

- (NSString *)appVersion {
    return [MSSafeObject stringInfo:MS_APP_VERSION];
}

- (NSString *)osVersion {
    return [MSSafeObject stringInfo:MS_SDK_VERSION_STRING];
}

- (NSString *)device {
    return [DeviceInfo getDeviceType];
}

- (NSString *)did {
    return [MSSafeObject stringInfo:[OpenUDID value]];
}

- (NSString *)os {
    return @"ios";
}

- (NSString *)seqid {
    return [MSSafeObject stringInfo:[[NSUUID UUID] UUIDString]];
}

+ (NSDictionary *)commonParams
{
    //获取公共参数
    MSCommonParamsGenerator *commonParams = [[MSCommonParamsGenerator alloc] init];
    NSDictionary *dic = [MTLJSONAdapter JSONDictionaryFromModel:commonParams error:nil];
    return dic;
}

@end
